export function generateMultiplicationDistributive(difficulty: 1 | 2 = 1): {
  content: string;
  solution: string;
  difficulty: number;
  knowledge_code: string;
  question_type: string;
} {
  // 难度1: 简单两位数分配 (a+b)×c
  // 难度2: 含负数或三位数的复杂分配 (a+b+c)×d
  
  if (difficulty === 1) {
    const a = Math.floor(Math.random() * 50) + 10;
    const b = Math.floor(Math.random() * 50) + 10;
    const c = Math.floor(Math.random() * 10) + 2;
    return {
      content: `(${a}+${b})×${c}`,
      solution: `(${a}+${b})×${c} = ${a}×${c}+${b}×${c} = ${a*c}+${b*c} = ${a*c + b*c}`,
      difficulty,
      knowledge_code: '3.2.2_chengfa-fenpeilu',
      question_type: 'fill_in_blank'
    };
  } else {
    const a = Math.floor(Math.random() * 100) + 50;
    const b = Math.floor(Math.random() * 100) + 50;
    const c = Math.floor(Math.random() * 100) + 50;
    const d = Math.floor(Math.random() * 20) + 5;
    return {
      content: `(${a}+${b}+${c})×${d}`,
      solution: `(${a}+${b}+${c})×${d} = ${a}×${d}+${b}×${d}+${c}×${d} = ${a*d}+${b*d}+${c*d} = ${a*d + b*d + c*d}`,
      difficulty,
      knowledge_code: '3.2.2_chengfa-fenpeilu',
      question_type: 'fill_in_blank'
    };
  }
}